package com.zyg.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data

public class User {
    private Integer id;
    private String name;
    private String pass;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;
    private Dept dept;
    //用户具有的角色列表
    private List<Role> roleList;
    //接受从前台传递到后台的ids
    private Integer[] roleIds;
    private Integer deptId;
//    //临时变量 验证码?
//    @TableField(exist = false)
//    private String code;



    // alt + insert
    public User() {
    }

    public User(String name, String pass) {
        this.name = name;
        this.pass = pass;
    }

    public User(Integer id, String name, String pass) {
        this.id = id;
        this.name = name;
        this.pass = pass;
    }
}
